package com.smart.campus.interfaces;

import com.smart.campus.dto.ShClass;
import com.smart.campus.pojo.PagedResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.interfaces
 * @Author: JinBao shan
 * @date 2024/9/23 20:12
 * @Description: TODO
 * @Version: 1.0
 */

public interface ShClassServiceApi {
    /**
     * @description: 班级信息列表分页查询
     * @author: JinBao shan 
     * @date: 2024/9/23 20:13
     * @param: [department, pageNum, pageSize] 条件查询参数 页码 条数
     * @return: 返回分页查询后的内容
     **/
    @RequestMapping(value = "class/findShClassPagination")
    public PagedResponse<ShClass> findShClassPagination(@RequestBody ShClass shClass, @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize",defaultValue = "5") Integer pageSize);
    
    /**
     * @description: 根据年级 获取 sh_class 表中信息
     * @author: JinBao shan 
     * @date: 2024/9/23 20:15
     * @param: []
     * @return: 根据年级 获取 sh_class 表中信息，并且返回一个list集合
     **/
    @RequestMapping(value = "class/getShClassList")
    public List<ShClass> getShClassList(@RequestParam(value = "grade") Integer grade);

    /**
     * @description: 新增班级信息
     * @author: JinBao shan 
     * @date: 2024/9/23 20:16
     * @param: [shClass] 班级信息
     * @return: void
     **/
    @RequestMapping(value = "class/addShClass")
    public void addShClass(@RequestBody ShClass shClass);

    /**
     * @description: 根据班级id返回对应班级信息
     * @author: JinBao shan 
     * @date: 2024/9/23 20:18
     * @param: [id] 班级id
     * @return: 根据班级id返回对应班级信息
     **/
    @RequestMapping(value = "class/getShClassById")
    public ShClass getShClassById(@RequestParam(value = "id") Integer id);

    /**
     * @description: 根据班级信息中的id修改对应的班级信息
     * @author: JinBao shan
     * @date: 2024/9/23 20:19
     * @param: [shClass] 班级信息
     * @return: void
     **/
    @RequestMapping(value = "class/updateShClassById")
    public void updateShClassById(@RequestBody ShClass shClass);

    /**
     * @description: 根据班级id删除对应的班级信息
     * @author: JinBao shan
     * @date: 2024/9/23 20:21
     * @param: [id] 班级id
     * @return: void
     **/
    @RequestMapping(value = "class/deleteShClassById")
    public void deleteShClassById(@RequestParam(value = "id") Integer id);

    /**
     * @description: 获取班级列表信息
     * @author: JinBao shan
     * @date: 2024/9/25 20:38
     * @param: []
     * @return: 所有班级信息
     **/
    @RequestMapping(value = "class/getShClassListAll")
    public List<ShClass> getShClassListAll();
}
